<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label for="c-group_id" class="control-label col-xs-12 col-sm-2">{:__('Group')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupList}
        </div>
    </div>

    <div class="form-group">
        <label for="c-group_type" class="control-label col-xs-12 col-sm-2">{:__('角色期限')}:</label>
        <div class="col-xs-12 col-sm-4">
            {$groupTypeList}
        </div>
    </div>

    <div class="form-group" id="group_end_time" style="display: none;">
        <label for="c-group-end-time" class="control-label col-xs-12 col-sm-2">{:__('角色到期时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class='input-group datetimepicker' style="width: 60%">
                <input type='text' class="form-control" id="c-group-end-time" name="group_end_time"/>
                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('学号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('姓名')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[name]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('性别')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[gender]', $genderData, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-id-number" class="control-label col-xs-12 col-sm-2">{:__('身份证')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-id-number" class="form-control" name="row[id_number]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-enrollment-year" class="control-label col-xs-12 col-sm-2">{:__('入学年份')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-enrollment-year" class="form-control" name="row[enrollment_year]" type="text" value="" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('院系')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[faculty_id]', $facultyData, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('专业')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[major_id]', $majorData, null, ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('年级/班级')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="grade_id,class_id">
                <select class="form-control grade_id" name="grade_id" data-url="base/grade/cxSelect"></select>
                <select class="form-control class_id" name="row[class_id]" data-url="base/classes/cxSelect" data-query-name="grade_id"></select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('床位')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="garden_number,building_number,dorm_number,bed_number">
                <select class="garden_number form-control" name="garden_number" data-url="dormitory/garden/cxSelect"></select>
                <select class="building_number form-control" name="building_number" data-url="dormitory/building/cxSelect" data-query-name="garden_number"></select>
                <select class="dorm_number form-control" name="dorm_number" data-url="dormitory/dorm/cxSelect" data-query-name="building_number"></select>
                <select class="bed_number form-control" name="bed_id" data-url="dormitory/bed/cxSelect?status=1" data-query-name="dorm_number"></select>
            </div>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <!--<button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>-->
        </div>
    </div>
</form>
